<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf">充值套餐列表</div>
                </div>
                <div class="widget-body am-fr">
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a class="am-btn am-btn-default am-btn-success am-radius"
                                       href="{:url('food.market.recharge.plan/add')}">
                                        <span class="am-icon-plus"></span> 新增
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                            <tr>
                                <th>编号</th>
								<th>充值金额</th>
                                <th>赠送类型</th>
                                <th>赠品名称</th>
								<th>赠送数量</th>
                                <th>排序</th>
                                <th>时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if sizeof($list) > 0}
                                {foreach $list as $item}
                                <tr>
                                    <td class="am-text-middle">
                                        <p class="item-title">{$item['recharge_plan_id']}</p>
                                    </td>
									<td class="am-text-middle">{$item['money']}</td>
                                    <td class="am-text-middle">{$item['gift_type']['text']}</td>
                                    <td class="am-text-middle">{$item['gift_type']['value'] == 10 ? $item['coupon']['name'] : '钱包余额'}</td>
									<td class="am-text-middle">{$item['gift_money']} {$item['gift_type']['value'] == 10 ? ' 张' : ' 元'}</td>
                                    <td class="am-text-middle">{$item['sort']}</td>
                                    <td class="am-text-middle">{$item['create_time']}</td>
                                    <td class="am-text-middle">
                                        <div class="tpl-table-black-operation">
                                            <a href="{:url('food.market.recharge.plan/edit',['id' => $item['recharge_plan_id']])}">
                                                <i class="am-icon-pencil"></i> 编辑
                                            </a>
                                            <a href="javascript:;" class="item-del tpl-table-black-operation-del"
                                               data-ids="{$item['recharge_plan_id']}">
                                                <i class="am-icon-trash"></i> 删除
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                {/foreach}
                            {else /}
                                <tr>
                                    <td colspan="8" class="am-text-center">暂无记录</td>
                                </tr>
                            {/if}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        // 删除元素
        var url = "{:url('food.market.recharge.plan/delete')}";
        $('.item-del').del('id', url);

    });
</script>

